//created by: Huiyi

Ext.define('MajorProjectSenchaTouch.controller.LibraryVideos', {
    extend: 'Ext.app.Controller',
	requires: [
    'Ext.util.DelayedTask'
    ],
	
    config:{
        views: ['LibraryVideosModule.LibraryVideos'],
		
        refs:{
            navView: 'mainNavView',
            libVideo1Button: 'button[action=goLibraryVideos1]',
            libVideo2Button: 'button[action=goLibraryVideos2]',
			libVideo3Button: 'button[action=goLibraryVideos3]',
			libVideo4Button: 'button[action=goLibraryVideos4]',
            libVideo5Button: 'button[action=goLibraryVideos5]',
			libVideo6Button: 'button[action=goLibraryVideos6]',
			libVideo7Button: 'button[action=goLibraryVideos7]',
            libVideo8Button: 'button[action=goLibraryVideos8]',
			libVideo9Button: 'button[action=goLibraryVideos9]',
			
        },

       control:{
           libVideo1Button:{
               tap: 'goLibraryVideos1'
           },
           libVideo2Button:{
               tap: 'goLibraryVideos2'
           },
		   libVideo3Button:{
               tap: 'goLibraryVideos3'
           },
		    libVideo4Button:{
               tap: 'goLibraryVideos4'
           },
           libVideo5Button:{
               tap: 'goLibraryVideos5'
           },
		   libVideo6Button:{
               tap: 'goLibraryVideos6'
           },
		    libVideo7Button:{
               tap: 'goLibraryVideos7'
           },
           libVideo8Button:{
               tap: 'goLibraryVideos8'
           },
		   libVideo9Button:{
               tap: 'goLibraryVideos9'
           }
       }
   },
	
		   goLibraryVideos1: function(){
        var ctrl = this.getApplication().getController('Main');
        var previousPage = ctrl.showMask();
        
        var task = Ext.create('Ext.util.DelayedTask', function(){
            window.open('http://dl.dropbox.com/u/31004927/videos/orientation_new.3gp');
            ctrl.hideMask(previousPage);  
        });
        task.delay(1);
     
    },
	
		   goLibraryVideos2: function(){
        var ctrl = this.getApplication().getController('Main');
        var previousPage = ctrl.showMask();
        
        var task = Ext.create('Ext.util.DelayedTask', function(){
            window.open('http://dl.dropbox.com/u/31004927/videos/plagiarism_new.3gp');
            ctrl.hideMask(previousPage);  
        });
        task.delay(1);
     
    },
	
	   goLibraryVideos3: function(){
        var ctrl = this.getApplication().getController('Main');
        var previousPage = ctrl.showMask();
        
        var task = Ext.create('Ext.util.DelayedTask', function(){
            window.open('http://dl.dropbox.com/u/31004927/videos/Library_Book_Recommendation.3gp');
            ctrl.hideMask(previousPage);  
        });
        task.delay(1);
     
    },
	
	 goLibraryVideos4: function(){
        var ctrl = this.getApplication().getController('Main');
        var previousPage = ctrl.showMask();
        
        var task = Ext.create('Ext.util.DelayedTask', function(){
            window.open('http://dl.dropbox.com/u/31004927/videos/Library_Promo_For_All_Levels.3gp');
            ctrl.hideMask(previousPage);  
        });
        task.delay(1);
     
    },
	 goLibraryVideos5: function(){
        var ctrl = this.getApplication().getController('Main');
        var previousPage = ctrl.showMask();
        
        var task = Ext.create('Ext.util.DelayedTask', function(){
            window.open('http://dl.dropbox.com/u/31004927/videos/Ask_A_Librarian.3gp');
            ctrl.hideMask(previousPage);  
        });
        task.delay(1);
     
    },
	 goLibraryVideos6: function(){
        var ctrl = this.getApplication().getController('Main');
        var previousPage = ctrl.showMask();
        
        var task = Ext.create('Ext.util.DelayedTask', function(){
            window.open('http://dl.dropbox.com/u/31004927/videos/Databases.3gp');
            ctrl.hideMask(previousPage);  
        });
        task.delay(1);
     
    },
	 goLibraryVideos7: function(){
        var ctrl = this.getApplication().getController('Main');
        var previousPage = ctrl.showMask();
        
        var task = Ext.create('Ext.util.DelayedTask', function(){
            window.open('http://dl.dropbox.com/u/31004927/videos/Self_Check.3gp');
            ctrl.hideMask(previousPage);  
        });
        task.delay(1);
     
    },
	 goLibraryVideos8: function(){
        var ctrl = this.getApplication().getController('Main');
        var previousPage = ctrl.showMask();
        
        var task = Ext.create('Ext.util.DelayedTask', function(){
            window.open('http://dl.dropbox.com/u/31004927/videos/Shared_PC.3gp');
            ctrl.hideMask(previousPage);  
        });
        task.delay(1);
     
    },
	 goLibraryVideos9: function(){
        var ctrl = this.getApplication().getController('Main');
        var previousPage = ctrl.showMask();
        
        var task = Ext.create('Ext.util.DelayedTask', function(){
            window.open('http://dl.dropbox.com/u/31004927/videos/Student_Privileges.3gp');
            ctrl.hideMask(previousPage);  
        });
        task.delay(1);
     
    }
	
	
	
	

	
	
    

    
});

